#!/bin/sh
#自行进入京东极速版--百元生活费--赚金币--逛商品赚金币
starttime=
dosedxstart=
dosedystart=
dosedbasex=
dosedbasey=

sectionname=$(echo $0 | cut -d '/' -f 3 | cut -d '_' -f 1 | sed 's/^ADBRUN//')
adbclient=$(uci get adbrun.$sectionname.adbiplist)
rm /tmp/adb_ADBRUN${sectionname}_.sh

function swipe3s() {
	sleep 3
	for i in $(seq 1 6) ;do
		adb -s ${adbclient}:5555 shell input swipe $xstart $ystart $xstart $(expr $ystart - 600)
		sleep 1
	done
	sleep 3
}

adb connect ${adbclient}:5555

ltimes=0
while [ $ltimes -lt 50 ]
do
	swipe3s
	adb -s ${adbclient}:5555 shell input tap $basex $basey
	sleep 3
	ltimes=$(expr $ltimes + 1)
done
